package com.google.code.server4j.connector;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class Request {

	private InputStream is;
	private String context;
	public Request(InputStream is) {
		this.is = is;
	}
	
	public void parse() throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(is));
		String line = br.readLine();
		if(line != null) {
			String[] requestLine = line.split(" +");
			this.context = requestLine[1].subSequence(1, requestLine[1].length()).toString();
		}
		
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}
	
	
}
